<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./common.css">
</head>

<body>
  <div id="app">
    <div class="notice right" v-if="this.show">
      <h3>
        {{title}}
      </h3>
      <p>{{message}}</p>
      <div class="ui buttons">
        <button class="button" @click="determine">确定</button>
        <button class="button" @click="cancle">取消</button>
      </div>
    </div>
    <button @click="open">打开提示框</button>
  </div>
  <script src='https://cdn.bootcss.com/vue/2.5.16/vue.min.js'></script>
  <script>
    new Vue({
      el: "#app",
      data: {
        title: "提示",
        message: "这是一段不起眼的提示",
        show: false,
        duration: 1000
      },
      methods: {
        determine() {
          this.show = false
        },
        cancle() {
          this.show = true
        },
        open() {
          this.show = true
        },
      }
    })
  </script>
</body>

</html>